package models;

import javax.persistence.*;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Collection;

/**
 * Created by john on 2016/9/11.
 */
@Entity
@Table(name = "t_ApplyInfo")
// 用表t_ApplyInfo，entity的set起作用
public class TApplyInfoEntity_circleTimes {

	private Integer fdApplyId;
	private Double fdmileage;
    private Integer addTimes;
	private Integer fdApplicantId;
	private Integer fdcircleTimes;
	private Integer fdDeliveryOrderId;
	private String applyNumber;
	private Timestamp fdAuditDate;
	private Integer fdAuditStatus;
	private Timestamp cancleTime;

	// 申请运货重量
	private BigDecimal fdSubDeliverQty;
	private Integer fdCarrierId;

	private Timestamp fdCreatDate;

	private Integer fdContractId;
	private String fdAuditReason;
	// 入厂单提交者id
	private Integer fdSubmitter;

	private Integer fdUnloadPlaceId;

	private Integer fdAuditorId;
	// 发货日期
	private Timestamp fdDeliDate;
	// 过磅重量
	private BigDecimal fdResult;

	@Basic
	@Column(name = "fd_Result", nullable = true, precision = 2)
	public BigDecimal getFdResult() {
		return fdResult;
	}

	public void setFdResult(BigDecimal fdResult) {
		this.fdResult = fdResult;
	}

	@Basic
	@Column(name = "fd_AuditStatus", nullable = false)
	public Integer getFdAuditStatus() {
		return fdAuditStatus;
	}

	public void setFdAuditStatus(Integer fdAuditStatus) {
		this.fdAuditStatus = fdAuditStatus;
	}

	@Basic
	@Column(name = "fd_SubDeliverQty", nullable = true, precision = 2)
	public BigDecimal getFdSubDeliverQty() {
		return fdSubDeliverQty;
	}

	public void setFdSubDeliverQty(BigDecimal fdSubDeliverQty) {
		this.fdSubDeliverQty = fdSubDeliverQty;
	}

	@Basic
	@Column(name = "fd_CarrierID", nullable = false)
	public Integer getFdCarrierId() {
		return fdCarrierId;
	}

	public void setFdCarrierId(Integer fdCarrierId) {
		this.fdCarrierId = fdCarrierId;
	}

	@Basic
	@Column(name = "fd_CreatDate", nullable = false)
	public Timestamp getFdCreatDate() {
		return fdCreatDate;
	}

	public void setFdCreatDate(Timestamp fdCreatDate) {
		this.fdCreatDate = fdCreatDate;
	}

	@Basic
	@Column(name = "fd_ContractId", nullable = true)
	public Integer getFdContractId() {
		return fdContractId;
	}

	public void setFdContractId(Integer fdContractId) {
		this.fdContractId = fdContractId;
	}

	@Basic
	@Column(name = "fd_Submitter", nullable = true)
	public Integer getFdSubmitter() {
		return fdSubmitter;
	}

	public void setFdSubmitter(Integer fdSubmitter) {
		this.fdSubmitter = fdSubmitter;
	}

	@Basic
	@Column(name = "fd_UnloadPlaceId", nullable = true)
	public Integer getFdUnloadPlaceId() {
		return fdUnloadPlaceId;
	}

	public void setFdUnloadPlaceId(Integer fdUnloadPlaceId) {
		this.fdUnloadPlaceId = fdUnloadPlaceId;
	}

	@Id
	@GeneratedValue
	@Column(name = "fd_ApplyID", nullable = false)
	public Integer getFdApplyId() {
		return fdApplyId;
	}

	public void setFdApplyId(Integer fdApplyId) {
		this.fdApplyId = fdApplyId;
	}

	@Basic
	@Column(name = "fd_AuditorID", nullable = true)
	public Integer getFdAuditorId() {
		return fdAuditorId;
	}

	public void setFdAuditorId(Integer fdAuditorId) {
		this.fdAuditorId = fdAuditorId;
	}

	@Basic
	@Column(name = "apply_number", nullable = false, length = 255)
	public String getApplyNumber() {
		return applyNumber;
	}

	public void setApplyNumber(String applyNumber) {
		this.applyNumber = applyNumber;
	}

	@Basic
	@Column(name = "fd_DeliDate", nullable = true)
	public Timestamp getFdDeliDate() {
		return fdDeliDate;
	}

	public void setFdDeliDate(Timestamp fdDeliDate) {
		this.fdDeliDate = fdDeliDate;
	}

	@Basic
	@Column(name = "fd_AuditDate", nullable = true)
	public Timestamp getFdAuditDate() {
		return fdAuditDate;
	}

	public void setFdAuditDate(Timestamp fdAuditDate) {
		this.fdAuditDate = fdAuditDate;
	}

	@Basic
	@Column(name = "Circle_Times", nullable = false)
	public Integer getFdcircleTimes() {
		return fdcircleTimes;
	}

	public void setFdcircleTimes(Integer fdcircleTimes) {
		this.fdcircleTimes = fdcircleTimes;
	}

	@Basic
	@Column(name = "fd_ApplicantID", nullable = false)
	public Integer getFdApplicantId() {
		return fdApplicantId;
	}

	public void setFdApplicantId(Integer fdApplicantId) {
		this.fdApplicantId = fdApplicantId;
	}

	@Basic
	@Column(name = "fd_DeliveryOrderId", nullable = false)
	public Integer getFdDeliveryOrderId() {
		return fdDeliveryOrderId;
	}

	public void setFdDeliveryOrderId(Integer fdDeliveryOrderId) {
		this.fdDeliveryOrderId = fdDeliveryOrderId;
	}

	@Basic
	@Column(name = "fd_mileage", nullable = false)
	public Double getFdmileage() {
		return fdmileage;
	}

	public void setFdmileage(Double fdmileage) {
		this.fdmileage = fdmileage;
	}

	@Basic
	@Column(name = "fd_AuditReason", nullable = true, length = 100)
	public String getFdAuditReason() {
		return fdAuditReason;
	}

	public void setFdAuditReason(String fdAuditReason) {
		this.fdAuditReason = fdAuditReason;
	}
	
	@Basic
	@Column(name = "AddTimes", nullable = true)
	public Integer getAddTimes() {
		return addTimes;
	}

	public void setAddTimes(Integer addTimes) {
		this.addTimes = addTimes;
	}

	
	@Basic
	@Column(name = "CancleTimes", nullable = true)
	public Timestamp getCancleTime() {
		return cancleTime;
	}

	public void setCancleTime(Timestamp cancleTime) {
		this.cancleTime = cancleTime;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((applyNumber == null) ? 0 : applyNumber.hashCode());
		result = prime * result
				+ ((fdApplicantId == null) ? 0 : fdApplicantId.hashCode());
		result = prime * result
				+ ((fdApplyId == null) ? 0 : fdApplyId.hashCode());
		result = prime * result
				+ ((fdAuditStatus == null) ? 0 : fdAuditStatus.hashCode());
		result = prime * result
				+ ((fdCarrierId == null) ? 0 : fdCarrierId.hashCode());
		result = prime * result
				+ ((fdContractId == null) ? 0 : fdContractId.hashCode());
		result = prime * result
				+ ((fdCreatDate == null) ? 0 : fdCreatDate.hashCode());
		result = prime
				* result
				+ ((fdDeliveryOrderId == null) ? 0 : fdDeliveryOrderId
						.hashCode());
		result = prime * result
				+ ((fdSubDeliverQty == null) ? 0 : fdSubDeliverQty.hashCode());
		result = prime * result
				+ ((fdSubmitter == null) ? 0 : fdSubmitter.hashCode());
		result = prime * result
				+ ((fdUnloadPlaceId == null) ? 0 : fdUnloadPlaceId.hashCode());

		result = prime * result
				+ ((fdcircleTimes == null) ? 0 : fdcircleTimes.hashCode());
		result = prime * result
				+ ((fdmileage == null) ? 0 : fdmileage.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		TApplyInfoEntity_circleTimes other = (TApplyInfoEntity_circleTimes) obj;
		if (applyNumber == null) {
			if (other.applyNumber != null)
				return false;
		} else if (!applyNumber.equals(other.applyNumber))
			return false;
		if (fdApplicantId == null) {
			if (other.fdApplicantId != null)
				return false;
		} else if (!fdApplicantId.equals(other.fdApplicantId))
			return false;
		if (fdApplyId == null) {
			if (other.fdApplyId != null)
				return false;
		} else if (!fdApplyId.equals(other.fdApplyId))
			return false;
		if (fdAuditStatus == null) {
			if (other.fdAuditStatus != null)
				return false;
		} else if (!fdAuditStatus.equals(other.fdAuditStatus))
			return false;
		if (fdCarrierId == null) {
			if (other.fdCarrierId != null)
				return false;
		} else if (!fdCarrierId.equals(other.fdCarrierId))
			return false;
		if (fdContractId == null) {
			if (other.fdContractId != null)
				return false;
		} else if (!fdContractId.equals(other.fdContractId))
			return false;
		if (fdCreatDate == null) {
			if (other.fdCreatDate != null)
				return false;
		} else if (!fdCreatDate.equals(other.fdCreatDate))
			return false;
		if (fdDeliveryOrderId == null) {
			if (other.fdDeliveryOrderId != null)
				return false;
		} else if (!fdDeliveryOrderId.equals(other.fdDeliveryOrderId))
			return false;
		if (fdSubDeliverQty == null) {
			if (other.fdSubDeliverQty != null)
				return false;
		} else if (!fdSubDeliverQty.equals(other.fdSubDeliverQty))
			return false;
		if (fdSubmitter == null) {
			if (other.fdSubmitter != null)
				return false;
		} else if (!fdSubmitter.equals(other.fdSubmitter))
			return false;
		if (fdUnloadPlaceId == null) {
			if (other.fdUnloadPlaceId != null)
				return false;
		} else if (!fdUnloadPlaceId.equals(other.fdUnloadPlaceId))
			return false;
		if (fdcircleTimes == null) {
			if (other.fdcircleTimes != null)
				return false;
		} else if (!fdcircleTimes.equals(other.fdcircleTimes))
			return false;
		if (fdmileage == null) {
			if (other.fdmileage != null)
				return false;
		} else if (!fdmileage.equals(other.fdmileage))
			return false;
		return true;
	}




}


